{% extends "admin/base.html" %}

{% block main %}
	<div class='main'>
	{% if posts %}
	
		<!-- pagemarks start -->
		{% if pagemarks %}
		<div class='pagemarks'>
		{% for mark in pagemarks %}
		{% if mark.is_link %}
		<a href='{{ mark.url }}' class='{{ mark.css }}'>{{ mark.label }}</a>
		{% else %}
		<span class='{{ mark.css }}'>{{ mark.label }}</span>
		{% endif %}
		{% endfor %}
		</div>
		{% endif %}
		<!-- pagemarks end -->
		
		<table class='list'>
		<tr>
			<th>标题</th>
			<th>修改时间</th>
			<th>&nbsp;</th>
		</tr>
		{% for p in posts %}
		<tr class="{{ loop.cycle('', 'alt') }}">
			<td><a href='/admin/posts/{{ p.id }}/'>{% if p.is_draft %}<span class='subject draft'><strong>{{ p.subject }}</strong></span>{% else %}<span class='subject'>{{ p.subject }}</span>{% endif %}</a></td>
			<td>{{ p.lastmodified_dt|datetimeformat('%Y-%m-%d %H:%M') }}</td>
			<td><a href='/admin/posts/{{ p.id }}/delete/' class='del'>删除</a></td>
		</tr>
		{% endfor %}
		</table>
	{% else %}
		<span class='notify'>没有文章。</span>
	{% endif %}
	</div>
{% endblock %}